package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class DomainConstraintList {

    private int beginIndex;
    private int endIndex;
    private List<DomainConstraint> domainConstraintList;

    public DomainConstraintList(List<DomainConstraint> domainConstraintList) {
        this.beginIndex = domainConstraintList.get(0).getEndIndex();
        this.endIndex = domainConstraintList.get(domainConstraintList.size() - 1).getEndIndex();
        this.domainConstraintList = domainConstraintList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return domainConstraintList.size();
    }

    public DomainConstraint get(int index) {
        return domainConstraintList.get(index);
    }

}
